1. Field of the Invention
The present invention relates to image processing for encoding image data.
2. Description of the Related Art
There is an image in which a character and line drawing (to be referred to as a character image, hereinafter), and a photographic image are mixed. Such image is to be referred to as a mixed image, hereinafter. If the mixed image is encoded with a high compression rate using one encoding scheme, the image quality deteriorates.
In order to prevent image quality deterioration in encoding of a mixed image, for example, the following method is available. First, image data having a three-layer structure including a character image region (to be referred to as a text region, hereinafter), a photographic image region (to be referred to as a photographic region, hereinafter), and attribute data (binary masking data) for specifying the region is generated. Then, an encoding scheme suited to the characteristics of each region is applied to it.
Since the method which utilizes image data having a three-layer structure requires masking data in addition to image data of a text region and that of a photographic region, the data amount increases.
Another method does not separate image data into three layers to encode it, but extracts a text region using edge information, separates the text region from a region (to be referred to as a background region, hereinafter) other than the character image, and encodes the regions. This method applies lossless encoding to binary data obtained by binarizing a text region, and applies multi-level image encoding to a background region.
The method which separates a text region from a background region and binarizes the text region cannot process a character image with a given tone value or gradation.